package course.dao;

import course.pojo.entity.Student;
import course.pojo.vo.Page;

import java.sql.Connection;
import java.util.List;

/**
 * @author HLF
 * @date 2022/6/30 20:26
 */
public interface StudentDao {
    Student getById(Integer sid, Connection connection);

    /**
     * @return 返回自增主键
     */
    int addStudent(Student student, Connection connection);

    int updateById(Student student, Connection connection);

    int updateInfo(Student student, Connection connection);
    int deleteById(Integer sid, Connection connection);

    List<Student> getList(Connection connection);

    /**/

    int deleteSelect(List<Integer> ids,Connection connection);

    long count(Connection connection);

    Page<Student> page(Integer pageNo, Connection connection);

    Page<Student> query(String tname,Integer pageNo,Connection connection);

    List<Student> selectBathByIds(List<Integer> ids,Connection connection);
}
